using Godot;
using System;

public partial class Player : Characters
{
    
    public override void Initialize()
    {
        base.Initialize();
        
    }

    public override void Update(double delta)
    {
        base.Update(delta);
        Vector2I _moveDirection = MoveInput();
        _movement.Move(_moveDirection,delta);
		//_movement.Update (delta);
    }

    public Vector2I MoveInput()
	{
		var move_x = Input.GetActionStrength("right") - Input.GetActionStrength("left");
		var move_y = Input.GetActionStrength("down") - Input.GetActionStrength("up");
		var direction = new Vector2(move_x,move_y);
        //GD.Print("方向",direction.Sign());
		return (Vector2I)direction.Sign();
	}
}
